package com.chengda.dashboard.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 报警信息实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("alarm_info")
public class AlarmInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 机台号
     */
    private String machineNo;

    /**
     * 报警类型
     */
    private String alarmType;

    /**
     * 报警级别(1:一般,2:重要,3:严重)
     */
    private Integer alarmLevel;

    /**
     * 报警信息
     */
    private String alarmMessage;

    /**
     * 状态(0:未处理,1:已处理)
     */
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 删除标志(0:未删除,1:已删除)
     */
    @TableLogic
    private Integer deleted;
}
